package com.foredu.fiqs.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Description:<br/>
 * 领域模型：职工借款类，代表教职工借款记录<br/>
 * Date:<br/>
 * 2014/5/13<br/>
 * 
 * @author hushigang
 */

@Entity
@Table(name="T_Loan")
public class Loan implements Serializable {

	private static final long serialVersionUID = 1L;
	private int id;// 借款ID
	private String purpose;// 借款事由
	private float amount;// 借款金额
	private Employee employee;// 借款人
	private String loanDay;// 借款日期

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	@Column
	public String getPurpose() {
		return purpose;
	}

	public void setPurpose(String purpose) {
		this.purpose = purpose;
	}

	@Column
	public float getAmount() {
		return amount;
	}

	public void setAmount(float amount) {
		this.amount = amount;
	}

	@ManyToOne
	@JoinColumn(name = "employee_id")
	public Employee getEmployee() {
		return employee;
	}

	public void setEmployee(Employee employee) {
		this.employee = employee;
	}

	@Column	
	public String getLoanDay() {
		return loanDay;
	}

	public void setLoanDay(String loanDay) {
		this.loanDay = loanDay;
	}

}
